import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    redirect:'/xiaoqu'
  },
  {
    path: '/xiaoqu',
    component:() => import('../components/XiaoQuComponent.vue'),
  },
  {//帮买
    path: '/help/mendian',
    component:() => import('../components/MenDianComponent.vue'),
    children: [
      {
        path: "",
        component:() => import('../components/DefaultMendian.vue'),
      },

        {
        path: 'manage',
        component:() => import('../components/ManageMenDian.vue'),
      }
    ]
  },
  {
    //商品管理
    path: '/help/product',
    component:() => import('../components/GoodsComponent(1).vue'),
  },
  {
    //驿站管理
    path:'/help/yizhan',
    component:() => import('../components/YiZhanComponent.vue'),
  },
  {
    //订单管理
    path: '/help/dingdan',
    component:() => import('../components/DingdanComponent(1).vue'),
    children:[
      {
        path:'qu',
        component:() => import('../components/Qu(1).vue'),
      },
      {
        path:'song',
        component:() => import('../components/Song(1).vue'),
      }
    ]
  }

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
